package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 情感分析结果，存储帖子或评论的情感分析数据对象 sentiment_analysis
 * 
 * @author ruoyi
 * @date 2025-03-08
 */
public class SentimentAnalysis extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 情感分析结果的唯一标识 */
    private Long analysisId;

    /** 所属帖子ID（可选） */
    private Long postId;

    /** 所属评论ID（可选） */
    private Long commentId;

    /** 情感得分（正/负/中性） */
    @Excel(name = "情感得分", readConverterExp = "正=/负/中性")
    private Long sentimentScore;

    /** 分析时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "分析时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date analysisTime;

    /** 提取的关键词（可选） */
    @Excel(name = "提取的关键词", readConverterExp = "可=选")
    private String keywords;

    public void setAnalysisId(Long analysisId) 
    {
        this.analysisId = analysisId;
    }

    public Long getAnalysisId() 
    {
        return analysisId;
    }

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }

    public void setCommentId(Long commentId) 
    {
        this.commentId = commentId;
    }

    public Long getCommentId() 
    {
        return commentId;
    }

    public void setSentimentScore(Long sentimentScore) 
    {
        this.sentimentScore = sentimentScore;
    }

    public Long getSentimentScore() 
    {
        return sentimentScore;
    }

    public void setAnalysisTime(Date analysisTime) 
    {
        this.analysisTime = analysisTime;
    }

    public Date getAnalysisTime() 
    {
        return analysisTime;
    }

    public void setKeywords(String keywords) 
    {
        this.keywords = keywords;
    }

    public String getKeywords() 
    {
        return keywords;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("analysisId", getAnalysisId())
            .append("postId", getPostId())
            .append("commentId", getCommentId())
            .append("sentimentScore", getSentimentScore())
            .append("analysisTime", getAnalysisTime())
            .append("keywords", getKeywords())
            .toString();
    }
}
